package com.icinfo.cloud.provider.punish.service;

import com.icinfo.cloud.provider.common.service.PunishBaseService;
import com.icinfo.cloud.provider.punish.common.documentoperate.dto.StageDocCommonHtmlRequest;
import com.icinfo.cloud.provider.punish.common.documentoperate.dto.StageDocCommonOperateSaveDto;
import com.icinfo.cloud.provider.punish.common.documentoperate.dto.StageDocCommonPreviewDto;
import com.icinfo.cloud.provider.punish.common.documentoperate.vo.DocumentCommonFormDataVo;
import com.icinfo.cloud.provider.punish.common.documentoperate.vo.DocumentCommonFormHtmlVo;
import com.icinfo.cloud.provider.punish.config.model.ConfigBusiParamDocumentInfo;
import com.icinfo.cloud.provider.punish.dto.PrintDocHtmlQueryDto;
import com.icinfo.cloud.provider.punish.dto.PrintDocQueryDto;
import com.icinfo.cloud.provider.punish.print.vo.PrintDocumentVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseTemporarySaveDto;
import com.icinfo.framework.common.web.Result;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author shishengyao
 * @description
 * @date 2022/7/5
 */
public interface IDocCommonOperateService extends PunishBaseService {
    /**
     * 描述：获取文书详情
     *
     * @param queryDto 查询dto
     * @return {@link String }
     * @author shishengyao
     * @date 2022/07/05
     */
    String getPrintDocHtmlContent(PrintDocHtmlQueryDto queryDto);
    /**
     * 描述：获取打印文书图片
     *
     * @param queryDto 查询dto
     * @return {@link String }
     * @author shishengyao
     * @date 2022/07/05
     */
    String getPrintDoImage(PrintDocHtmlQueryDto queryDto);

    /**
     * 描述：获取文书模板code
     *
     * @param partyType
     * @param configBusiParamDocumentInfos
     * @return
     */
    String getTemplateCodeByDocumentCatalogCode(List<ConfigBusiParamDocumentInfo> configBusiParamDocumentInfos, String partyType);

    /**
     * 获取文书html公共方法
     * @param request
     * @return
     */
    Result<DocumentCommonFormHtmlVo> getDocBaseInfo(StageDocCommonHtmlRequest request);

    /**
     * 获取文书数据公共方法
     * @param request
     * @return
     */
    Result<DocumentCommonFormDataVo> getDocFormData(StageDocCommonHtmlRequest request);

    /**
     * 描述：保存文书信息通用接口
     * @param saveDto
     * @return
     */
    Result<Map<String, Object>> saveDocInfo(StageDocCommonOperateSaveDto saveDto);


    /**
     * 预览文书接口
     *
     * @param previewDto
     * @return
     */
    Result<Map<String, Object>> docPreview(StageDocCommonPreviewDto previewDto);

    /**
     * 文书暂存功能--通用
     * @param saveDto
     * @return
     */
    Result saveCaseReasonRecord(@RequestBody CaseTemporarySaveDto saveDto);


    /**
     * 打印内容转换为json，由前端统一打印
     *
     * @param dto
     * @return
     */
    PrintDocumentVo getPrintDocContent(PrintDocQueryDto dto);

    /**
     * 根据部门名称和签章日期 获取签章图片base64
     *
     * @param orgStandardNameSeal 部门名称
     * @param sealDate            签章日期
     * @param orgCode             需要盖章部门的orgCode
     * @param deptCode            需要盖章部门的deptCode
     * @return 签章图片base64
     */
    String getSealPreviewInfo(String orgStandardNameSeal, String sealDate, String orgCode, String deptCode);
}
